            <div class="category-mod" style="display:block;">
 <?php 
$category_active[1][1]['url']='#';
$category_active[1][1]['name']='妈咪爱美丽！夏季彩妆8折起！';
$category_active[1][2]['url']='#';
$category_active[1][2]['name']='妈咪爱美丽！夏季彩妆8折起！';

$category_active[2][1]['url']='#';
$category_active[2][1]['name']='妈咪爱美丽！夏季彩妆8折起！';
$category_active[2][2]['url']='#';
$category_active[2][2]['name']='妈咪爱美丽！夏季彩妆8折起！';

$category_active[3][1]['url']='#';
$category_active[3][1]['name']='妈咪爱美丽！夏季彩妆8折起！';
$category_active[3][2]['url']='#';
$category_active[3][2]['name']='妈咪爱美丽！夏季彩妆8折起！';

$category_active[4][1]['url']='#';
$category_active[4][1]['name']='妈咪爱美丽！夏季彩妆8折起！';
$category_active[4][2]['url']='#';
$category_active[4][2]['name']='妈咪爱美丽！夏季彩妆8折起！';

$category_active[5][1]['url']='#';
$category_active[5][1]['name']='妈咪爱美丽！夏季彩妆8折起！';
$category_active[5][2]['url']='#';
$category_active[5][2]['name']='妈咪爱美丽！夏季彩妆8折起！';

$category_active[6][1]['url']='#';
$category_active[6][1]['name']='妈咪爱美丽！夏季彩妆8折起！';
$category_active[6][2]['url']='#';
$category_active[6][2]['name']='妈咪爱美丽！夏季彩妆8折起！';

 ?>
			<?php $count=0; foreach(array_slice ($CATEGORY1[0], 0) as $key=>$cat){ $count++; ?>					
				<div class="category-item-box">
                    <div class="category-item-hd">
                        <div class="category-name">
                            <a href="<?php echo $this->_url('default/shop/');?>?cat_id=<?php echo  $cat['id'];?>&k=<?php echo  $k;?>&page=<?php echo  $page;?>" title="<?php echo  $cat['cat_name'];?>"><?php echo  $cat['cat_name'];?></a>
                        </div>
                        <div class="category-active">
						    <?php if (isset($category_active[$count])) { ?>
                            <div class="category-active-left-bg">
							
                            	<ul class="category-active-box">
								   <?php foreach($category_active[$count] as $v1) { ?>
                                	<li><a href="<?php echo $v1['url'];?>"><?php echo $v1['name'];?></a></li>
									<?php } ?>
                                </ul>
								
                            </div>
							<?php } ?>
                        </div>
                        <div class="category-more">
                            <a href="<?php echo $this->_url('default/shop/');?>?cat_id=<?php echo  $cat['id'];?>&k=<?php echo  $k;?>&page=<?php echo  $page;?>" title="<?php echo  $cat['cat_name'];?>">更多>></a>
                        </div>
                    </div>
                    <ul class="category-list-box">
					<?php $num1 = 0 ; ?>
                    <?php if(isset($CATEGORY1[$cat['id']]) && $CATEGORY1[$cat['id']]){?>
				        <?php  foreach(array_slice ($CATEGORY1[$cat['id']], 0) as $subcat){	$num1 ++ ; }?>
				    <?php }?> 
					<?php $num2 = ceil($num1/6) ; ?>	
					<?php for($num3=1; $num3<=$num2; $num3++) { ?>
                        <?php if(isset($CATEGORY1[$cat['id']]) && $CATEGORY1[$cat['id']]){?>				        					
                    	
						    <?php $num4=1; 
							foreach(array_slice ($CATEGORY1[$cat['id']], 0) as $subcat){ 
							if((($num3-1)*6)>$num4)continue;
							if(($num3*6)<$num4)break;							
							?>
							<?php if ((($num4-1)%6)==0) { ?>
						<li>
						    <h5 class="sub-cat"><a href="<?php echo $this->_url('default/shop/');?>?cat_id=<?php echo  $subcat['id'];?>&k=<?php echo  $k;?>&page=<?php echo  $page;?>" title="<?php echo  $cat['cat_name'];?>"><?php echo  $subcat['cat_name'];?></a></h5>
							<span>
							<?php } else { ?>						    
						        <a href="<?php echo $this->_url('default/shop/');?>?cat_id=<?php echo  $subcat['id'];?>&k=<?php echo  $k;?>&page=<?php echo  $page;?>" title="<?php echo  $cat['cat_name'];?>"><?php echo  $subcat['cat_name'];?></a>
							<?php }?>
							<?php if ( $num4==$num3*6 ) { ?>
							</span>
						</li>	
							<?php }?>
							<?php $num4++; } ?>
										        
				        <?php }?>                       
                    <?php }?>
                    </ul>
                    <div class="clear"></div>
                </div>
 			<?php }?>
			

			<!--	
                <div class="category-item-box">
                    <div class="category-item-hd">
                        <div class="category-name">
                            <a href="#">原材料</a>
                        </div>
                        <div class="category-active">
                            <div class="category-active-left-bg">
                            	<ul class="category-active-box">
                                	<li><a href="#">妈咪爱美丽！夏季彩妆8折起！</a></li>
                                    <li><a href="#">妈咪爱美丽！夏季彩妆8折起！</a></li>
                                </ul>
                            </div>
                        </div>
                        <div class="category-more">
                            <a href="#">更多>></a>
                        </div>
                    </div>
                    <ul class="category-list-box">
                    	<li>
						    <h5 class="sub-cat"><a href="#">橡塑</a></h5>
							<span>
							     <a href="#">通用料</a>
								 <a href="#">工程料</a>
								 <a href="#">橡胶</a>
								 <a href="#">废料</a>
								 <a href="#">制品</a>
							</span>
						</li>
                        <li><h5 class="sub-cat"><a href="#">橡塑</a></h5><span><a href="#">通用料</a><a href="#">工程料</a><a href="#">橡胶</a><a href="#">废料</a><a href="#">制品</a></span></li>
                        <li><h5 class="sub-cat"><a href="#">橡塑</a></h5><span><a href="#">通用料</a><a href="#">工程料</a><a href="#">橡胶</a><a href="#">废料</a><a href="#">制品</a></span></li>
                        <li><h5 class="sub-cat"><a href="#">橡塑</a></h5><span><a href="#">通用料</a><a href="#">工程料</a><a href="#">橡胶</a><a href="#">废料</a><a href="#">制品</a></span></li>
                        <li><h5 class="sub-cat"><a href="#">橡塑</a></h5><span><a href="#">通用料</a><a href="#">工程料</a><a href="#">橡胶</a><a href="#">废料</a><a href="#">制品</a></span></li>
                        <li><h5 class="sub-cat"><a href="#">橡塑</a></h5><span><a href="#">通用料</a><a href="#">工程料</a><a href="#">橡胶</a><a href="#">废料</a><a href="#">制品</a></span></li>
                        <li><h5 class="sub-cat"><a href="#">橡塑</a></h5><span><a href="#">通用料</a><a href="#">工程料</a><a href="#">橡胶</a><a href="#">废料</a><a href="#">制品</a></span></li>
                        <li><h5 class="sub-cat"><a href="#">橡塑</a></h5><span><a href="#">通用料</a><a href="#">工程料</a><a href="#">橡胶</a><a href="#">废料</a><a href="#">制品</a></span></li>
                        <li><h5 class="sub-cat"><a href="#">橡塑</a></h5><span><a href="#">通用料</a><a href="#">工程料</a><a href="#">橡胶</a><a href="#">废料</a><a href="#">制品</a></span></li>
                    </ul>
                    <div class="clear"></div>
                </div>
			-->	
                <div class="clear"></div>
        	</div>